class Animal():
    def __init__(self,name,age):
        self.__name=name
        self.age=age

class Dog(Animal):
    def __init__(self,name,age):
        #调用父类方法
        super().__init__(name,age)
    def getAge(self):
        print("小狗年龄：",self.age)

dog=Dog(name="xDog",age=5)
dog.getAge()

